﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SearchCodeMapping.ascx.cs"
    Inherits="WebForm_ManageCodeMapping_SearchCodeMapping" %>
<%@ Register Namespace="My" TagPrefix="cc1" %>
<table>
    <tr>
        <td>
            <table>
                <asp:UpdatePanel ID="upDDLTableName" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <tr>
                            <td align="right" style="height: 24px">
                                <asp:Label ID="Label1" runat="server" meta:resourcekey="lblTableName"></asp:Label></td>
                            <td align="left" style="height: 24px">
                                <My:MyDropDownList ID="ddlTableName" runat="server" AutoPostBack="True" DataSourceID="ObjectDataSource2"
                                    DataTextField="TableText" DataValueField="CodeHeaderID">
                                </My:MyDropDownList></td>
                            <td style="height: 24px">
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td align="right" style="height: 26px">
                                <asp:Label ID="Label2" runat="server" meta:resourcekey="lblColumnName"></asp:Label></td>
                            <td align="left" style="height: 26px">
                                <My:MyDropDownList ID="ddlColumnName" runat="server" AutoPostBack="false" DataSourceID="ObjectDataSource3"
                                    DataTextField="ColumnText" DataValueField="ID">
                                </My:MyDropDownList>
                            </td>
                            <td style="height: 26px">
                                &nbsp;</td>
                        </tr>
                    </ContentTemplate>
                </asp:UpdatePanel>
                <tr>
                    <td align="right">
                        <asp:Label ID="lblValue" runat="server" meta:resourcekey="lblValue"></asp:Label></td>
                    <td align="left">
                        <asp:TextBox ID="txtValue" runat="server"></asp:TextBox></td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="lblText" runat="server" meta:resourcekey="lblText"></asp:Label></td>
                    <td align="left">
                        <asp:TextBox ID="txtText" runat="server"></asp:TextBox></td>
                    <td>
                        &nbsp;<asp:Button ID="btGetData" runat="server" meta:resourcekey="btGetData" OnClick="btGetData_Click" /></td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<br />
<%--<My:MyGridView ID="gv" runat="server" SkinID="pager" AllowHoverSelect="False" AllowHoverEffect="False"
    MySortDirection="Ascending" DataKeyNames="TableName,ColumnName,Value" AutoGenerateColumns="False"
    MouseOverColor="" BackColor="White" BorderColor="#E7E7FF" BorderStyle="None"
    BorderWidth="1px" CellPadding="3" GridLines="Horizontal" OnRowUpdating="gv_RowUpdating"
    OnRowCommand="gv_RowCommand" OnRowEditing="gv_RowEditing" meta:resourcekey="gv">--%>
<My:MyGridView ID="gv" runat="server" SkinID="pager" AllowHoverSelect="False" AllowHoverEffect="False"
    MySortDirection="Ascending" DataKeyNames="TableName,ColumnName,Value" AutoGenerateColumns="False"
    MouseOverColor="" OnRowUpdating="gv_RowUpdating"
    OnRowCommand="gv_RowCommand" OnRowEditing="gv_RowEditing" meta:resourcekey="gv" TotalRowCount="0">    
    <Columns>
        <asp:BoundField DataField="TableText" meta:resourcekey="bfTableText" />
        <asp:BoundField DataField="ColumnText" meta:resourcekey="bfColumnText" />
        <asp:BoundField DataField="Value" meta:resourcekey="bfValue" />
        <asp:BoundField DataField="Text" meta:resourcekey="bfText" />
        <asp:BoundField DataField="MOIValue" meta:resourcekey="bfMOIValue" /> 
        <asp:BoundField DataField="ActiveText" meta:resourcekey="bfActive" />
        <asp:TemplateField>
            <itemtemplate>
<asp:LinkButton id="lknEdit" meta:resourcekey="lknEdit" runat="server" __designer:wfdid="w122" CommandName="Edit"></asp:LinkButton> 
</itemtemplate>
        </asp:TemplateField>
        <asp:TemplateField Visible="false">
            <itemtemplate>
<asp:Label id="lblTableName" runat="server" __designer:wfdid="w100" Text='<%# Eval("TableName") %>' Visible="False"></asp:Label> 
</itemtemplate>
        </asp:TemplateField>
        <asp:TemplateField Visible="false">
            <itemtemplate>
<asp:Label id="lblColumnName" runat="server" __designer:wfdid="w101" Text='<%# Eval("ColumnName") %>' Visible="False"></asp:Label> 
</itemtemplate>
        </asp:TemplateField>
        <asp:TemplateField Visible="false">
            <itemtemplate>
<asp:Label id="lblValue" runat="server" __designer:wfdid="w102" Text='<%# Eval("Value") %>' Visible="False"></asp:Label> 
</itemtemplate>
        </asp:TemplateField>
        
    </Columns>
<%--    <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
    <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
    <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
    <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
    <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
    <AlternatingRowStyle BackColor="#F7F7F7" />--%>
</My:MyGridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" InsertMethod="InsertData"
    SelectMethod="GetData" TypeName="CodeMappingDAO" UpdateMethod="UpdateData" OnSelecting="ObjectDataSource1_Selecting">
    <UpdateParameters>
        <asp:Parameter Name="TableName" Type="String" />
        <asp:Parameter Name="ColumnName" Type="String" />
        <asp:Parameter Name="Value" Type="String" />
        <asp:Parameter Name="Text" Type="String" />
        <asp:Parameter Name="MOIValue" Type="String" />
    </UpdateParameters>
    <SelectParameters>
        <asp:Parameter Name="TableName" Type="String" />
        <asp:Parameter Name="ColumnName" Type="String" />
        <asp:ControlParameter ControlID="txtValue" Name="Value" PropertyName="Text" Type="String" />
        <asp:ControlParameter ControlID="txtText" Name="Text" PropertyName="Text" Type="String" />
        <asp:Parameter DefaultValue="Y" Name="Active" Type="String" />
    </SelectParameters>
    <InsertParameters>
        <asp:Parameter Name="TableName" Type="String" />
        <asp:Parameter Name="ColumnName" Type="String" />
        <asp:Parameter Name="Value" Type="String" />
        <asp:Parameter Name="Text" Type="String" />
        <asp:Parameter Name="MOIValue" Type="String" />
        <asp:Parameter Name="Active" Type="String" />
    </InsertParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetdllTableTextItem"
    TypeName="CodeMappingDAO"></asp:ObjectDataSource>
<asp:ObjectDataSource ID="ObjectDataSource3" runat="server" SelectMethod="GetdllTableTextItem"
    TypeName="CodeMappingDAO">
    <SelectParameters>
        <asp:ControlParameter ControlID="ddlTableName" Name="CodeHeaderID" PropertyName="SelectedValue"
            Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>
&nbsp; 